<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>  
<title>植物DNA检测系统</title>
<link href="<%=request.getContextPath() %>/wang-css/reset.css" type="text/css" rel="stylesheet" />
<link href="<%=request.getContextPath() %>/wang-css/header.css" type="text/css" rel="stylesheet" />
<link href="<%=request.getContextPath() %>/wang-css/eos-system.css" type="text/css" rel="stylesheet" />
<link href="<%=request.getContextPath() %>/wang-css/eos-cms.css" type="text/css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/base.css" media="all" />
<link rel="stylesheet" href="<%=request.getContextPath() %>/js/jquery-ui-1.10.3.custom/css/redmond/jquery-ui.css" />
<link rel="stylesheet" href="<%=request.getContextPath() %>/uploadify/uploadify.css" type="text/css"/>
<script src="<%=request.getContextPath() %>/js/jquery-ui-1.10.3.custom/js/jquery-1.9.1.js"></script>
<script src="<%=request.getContextPath() %>/js/jquery-ui-1.10.3.custom/js/jquery-ui.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/uploadify/jquery.uploadify.min.js"></script>
<style type="text/css">
#hd{
	width: 100%;
	margin:auto;
	border: 0px solid #ccc; 
	height: 39px;	
	background:url(../images/nav-bg.png) repeat-x 0 -31px;
}
.ui-widget-header {
border: 1px solid #4297d7;
background: #5c9ccc url(../images/ui-bg_gloss-wave_75_07a1df_500x100.png) 50% 50% repeat-x;
color: #ffffff;
font-weight: bold;
}
</style>
<script type="text/javascript">
	var tabs;
   $(document).ready(function(){
       //初始化tabs
	   tabs =	$("#tabs").tabs({
	 		beforeLoad: function( event, ui ) { 
	 		 ui.jqXHR.error(function() {  
		          ui.panel.html("内容无法载入……请稍后再试！");  
		     }); 
	 		},
	 		load: function( event, ui ) {
	 		//	 $(this).tabs( "option", "active",true);
	 			//动态加载js
	 			var v = ui.tab.get(0).attributes.biaoshi.value;
	 			if(v=='selectshow'){
	 				$.getScript('<%=request.getContextPath()%>/js/corn-select.js');
	 			}else if(v=='allshow'){
	 				$.getScript('<%=request.getContextPath()%>/js/corn-show.js');
	 			}else if(v=='editshow'){
	 				$.getScript('<%=request.getContextPath()%>/js/corn-test-show.js');
	 			}else if(v=='selectByMbPage'){
	 				$.getScript('<%=request.getContextPath()%>/js/jquery.form.js');
	 				$.getScript('<%=request.getContextPath()%>/js/corn-select-mb.js');
	 			}else if(v=='addpage'){
	 				$.getScript('<%=request.getContextPath()%>/js/jquery.form.js');
	 				$.getScript('<%=request.getContextPath()%>/js/corn-add.js');
	 				
	 			}
	 		}
	 	});
	 	//点击左侧菜单进行tab切换
	 	$(".menu-1").click(function(e){
	 		$("#tabs ul").empty(); 
	 		$("#tabs div").remove();
	 		<%-- var srcpath = "<%=request.getContextPath()%>"+$(this).attr('url');
			$("#tab_a").attr({"href":srcpath});
	  		$("#tab_a span").text($(this).attr('zi'));
	  		tabs.tabs("load",0); --%>
	  		addTab("tab_a",$(this).attr('biaoshi'),'<%=request.getContextPath()%>'+$(this).attr('url'),$(this).attr('zi'),false);
	 	});
	 	// validate the comment form when it is submitted
		/* $("#form1").validate({
			rules: {
				name: {
					required: true,
					minlength: 2
				},
				email: {
					required: true,
					email: true
				},
				password: {
					required: true,
					minlength: 6
				},
				username: {
					required: true,
					minlength: 2
				}
			},
			messages: {
				name:{
					required:"name is not null",
					minlength:"min length 2"
				},
				email: {
					required: 'Enter this!',
					email:"email error"
				},
				username: {
					required: 'username is not null',
					minlength:"min length 2"
				},
				password:{
					required: 'password is not null',
					minlength:"min length 6"
				}
			}
		}); */
		
	});
	//增加ajax tab
	function addTab(id,biaoshi,url,title,isClose,isQuChong){	
	  if(isQuChong){
	  	$("#"+$("#"+id).attr("aria-controls")).remove();
	  	$("#"+id).remove();		
		
	  }	
      var li ='<li id="'+id+'"  biaoshi="'+biaoshi+'"><a href="'+url+'">'+title+'</a>';   
      if(isClose){
      	li+='<span class="ui-icon ui-icon-closethick" onclick="javascript:tabsClose(\''+id+'\');" style="float: left; margin: 0.4em 0.2em 0 0; cursor: pointer;" ></span>';
      }
      li+="</li>";
	  tabs.find(".ui-tabs-nav").append(li);
      tabs.tabs( "refresh" );
      var active = tabs.tabs( "option", "active" );
      tabs.tabs( "option", "active",active+1);
     
	}
	function addTab_(id,biaoshi,content,title,isClose,isQuChong){	
	  if(isQuChong){
	  	$("#"+$("#"+id).attr("aria-controls")).remove();
	  	$("#"+id).remove();		
		
	  }		
      var li ='<li id="'+id+'"  biaoshi="'+biaoshi+'"><a href="#'+id+'_1">'+title+'</a>';   
      if(isClose){
      	li+='<span class="ui-icon ui-icon-closethick" onclick="javascript:tabsClose(\''+id+'\');" style="float: left; margin: 0.4em 0.2em 0 0; cursor: pointer;" ></span>';
      }
      li+="</li>";
	  tabs.find(".ui-tabs-nav").append(li);
	  tabs.append( "<div id='" + id + "_1'><p>" + content + "</p></div>" );  
      tabs.tabs( "refresh" );
      var active = tabs.tabs( "option", "active" );
      tabs.tabs( "option", "active",active+1);
	}
	//关闭tab
	function tabsClose(id){
		$("#"+$("#"+id).attr("aria-controls")).remove();
		$("#"+id).remove();			
		tabs.tabs( "refresh" );
	}
  	function navTab(num){
  		for(var i=1;i<3;i++){
  			if(i==num){
  				$("#nav"+i).css("display","block");
  			}else {
	  			$("#nav"+i).css("display","none");
  			}
  		}
  	}
  </script>
</head>
<body>
<input type="hidden" id="basePath" value="<%= request.getContextPath() %>"/>
<div id="header"> 

</div>

<div id="hd">
    <ul class="nav-list clearfix">
        <li class="current"><a href="javascript:void(0)"><span>首页</span></a></li>
        <li><a href="javascript:void(0)" onclick="navTab(1)"><span>种子库管理</span></a></li>
        <li><a href="javascript:void(0)" onclick="navTab(2)"><span>种子DNA比对</span></a></li>
    </ul>
    <div style="padding-top: 11px;margin-top: 0px;padding-right: 20px;">
		<a href="<%=request.getContextPath() %>/login/layout.form"><span style="float:right;">退出</span><span class="ui-icon ui-icon-power" style="float:right;"></span>
		</a>
	</div>
</div>
<div class="content-wrap">
	<div  class="module-right">		
    	<div id="pageRight" class="page-right" >  	
            	<div id="tabs" style="border-width: 0px;">
          			  <ul>
				    <li id="tab_a" biaoshi="allshow"><a  href="<%=request.getContextPath() %>/test/allshow.form" ><span>种子库信息展现</span></a></li>
				  </ul>					 
          			</div>              
        </div>
    </div>
	<div  class="module-left">
    	<div  class="left-inner">
    		<div class="page-left">
    			<div id="nav1">
       		 		<div class="sidebar"><b></b><a href="<%=request.getContextPath() %>/file/downmb.form?modle-key=DNA-FOMAT-1">种子信息模板下载</a></div>
        			 <div class="sidebar"><b></b><a href="#"  url="/test/allshow.form" zi='种子库信息展现' biaoshi="allshow" class="menu-1">种子库信息展现</a></div>
       				 <div class="sidebar"><b></b><a href="#" url="/test/addpage.form" zi='种子库信息添加' biaoshi="addpage" class="menu-1">种子库信息添加</a></div>
      		  </div>
       		<div id="nav2" style="display:none">
       			 <div class="sidebar"><b></b><a href="#" url="/test/selectshow.form" zi='种子信息查询'  biaoshi="selectshow"  class="menu-1">种子信息查询</a></div>
        	 	<div class="sidebar"><b></b><a href="#" url="/test/selectByMbPage.form" zi='依据模型信息查询'  biaoshi="selectByMbPage" class="menu-1">依据模型信息查询</a></div>
       		 </div>
   			 </div>    	
	</div>	
    </div>
</div>
<div id="footer">Copyright Notice © 2004 - 2012 All rights reserved.</div>
 </body>
</html>
